# encoding=utf8

from car.app import app, api
from car.customer.api import ns as car_ns
api.add_namespace(car_ns)

if __name__ == "__main__":
    from tornado.wsgi import WSGIContainer
    from tornado.ioloop import IOLoop
    from tornado.web import FallbackHandler, Application

    wsgi = WSGIContainer(app)
    application = Application([
        (r".*", FallbackHandler, dict(fallback=wsgi)),
    ])
    application.listen(8080, address='0.0.0.0')
    IOLoop.current().start()
